package com.jfinal.ext.ueditor.result;

import org.jetbrains.annotations.NotNull;

import java.util.Collections;
import java.util.List;

/**
 * @author Timor
 * @version 1.0
 * @date 2023/01/04 16:19:59
 */
public class ListResult<T> extends RetResult {
    private final List<T> list;


    public ListResult(@NotNull List<T> list) {
        super(true);

        this.list = List.copyOf(list);
    }

    public ListResult(@NotNull String message) {
        super(message);

        this.list = Collections.emptyList();
    }


    public List<T> getList() {
        return list;
    }

}
